<div class="data-input">
    <fieldset>
        <legend><?php echo "$formTitle";?></legend>
        <?php
          foreach ($dataInput as $row);
          echo form_open($subLink,'');
        ?>
        <label>Nama</label><?php echo form_input("nama", $row['nama'], "id=nama");?> 
        <label>Kelas</label>
        <select name="kelas" id="kelas">
            <option value="">Pilih kelas</option>
            <?php
              foreach ($listKelas as $rows){
            ?>
            <option value="<?php echo $rows['id'];?>" <?php if($row['id_kelas']==$rows['id']) echo "selected='selected'";?>><?php echo $rows['nama']." ".$rows['tingkat_pendidikan'];?></option>
            <?php
              }
            ?>
        </select>
        <fieldset class="input-process">
          <?php  
            echo form_hidden('id', $row['id']);
            echo form_submit('edit', 'Simpan', 'class=button style=margin-right:2px');
            echo form_button('Batal', 'Batal', 'class=button onClick='."javascript:location.href='".base_url()."index.php/mata_pelajaran/'".'');
          ?>
        </fieldset>
        <?php
         echo form_close();
        ?>
    </fieldset>
</div>
